//
//  JPNavigationBar.h
//  JPWords
//
//  Created by 梁淑婷 on 2024/4/19.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger,JPBarButtonItemPosition){
    JPBarButtonItemPosition_Left = 0,
    JPBarButtonItemPosition_Right,
    JPBarButtonItemPosition_Middle
};

@interface JPNavigationBar : UIView

@property (nonatomic,strong,readonly) UIButton *backButton;

- (void)setItemView:(UIView *)itemView inPosition:(JPBarButtonItemPosition)position;

@property (nonatomic,copy) UIView *titleView;
@property (nonatomic,strong) UIButton *leftButton;
@property (nonatomic,strong) UIButton *rightButton;

@end

@interface JPNavigationBar (EasySet)

- (void)setTitle:(NSString *)title;
- (void)setTitle:(NSString *)title inPosition:(JPBarButtonItemPosition)position;
- (void)setIcon:(UIImage *)icon inPosition:(JPBarButtonItemPosition)position;

- (void)setLeftItemWithTitle:(NSString *)title;
- (void)setRightItemWithTitle:(NSString *)title;
- (void)setLeftItemWithIcon:(UIImage *)icon;
- (void)setRightItemWithIcon:(UIImage *)icon;

@end

NS_ASSUME_NONNULL_END
